package libs.wenshi.com.test;

import com.wenshi.app.activity.WsListViewActivity;
import com.wenshi.view.IKeyValue;
import com.wenshi.view.WsViewMapData;

import java.util.ArrayList;
import java.util.HashMap;

public class ListActivity extends WsListViewActivity {
    @Override
    public void onReLoadContent() {

    }

    @Override
    public void __onCreate() {
        initAdapterData(getData(), R.layout.list_item_1);
    }

    private ArrayList<IKeyValue> getData() {
        ArrayList<IKeyValue> list = new ArrayList<>();

        HashMap<String, String> map;


        for (int i = 0; i < 100; i++) {
            map = new HashMap<String, String>();
            map.put("title", "G" + i);
            map.put("info", "google " + i);
            map.put("type", (i % 2) + "");
            list.add(WsViewMapData.from(map));
        }


        return list;
    }
}
